QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets webenginewidgets webchannel

greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 6): QT += charts

CONFIG += c++11


#指定输出目录
exeoutdir=bin
win32:CONFIG(release, debug|release){
exeoutdir = release
}else{
exeoutdir = debug
}
#message($$exeoutdir)
DESTDIR = $$PWD/$$exeoutdir

win32-msvc* {
    #去掉c4100警告
    QMAKE_CXXFLAGS *=  /wd"4100"
    contains (QMAKE_CXXFLAGS_WARN_ON, -w34100) : QMAKE_CXXFLAGS_WARN_ON -= -w34100
}

# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
    Echarts/WebEngineView.cpp \
    Echarts/CWidgetBrowser.cpp \
    boundobj.cpp \
    main.cpp \
    mainwindow.cpp\

HEADERS += \
    Echarts/WebEngineView.h \
    Echarts/CWidgetBrowser.h \
    boundobj.h \
    mainwindow.h\

FORMS += \
    mainwindow.ui

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

#解决qmake重复执行的问题
defineReplace(remove_extra_config_parameter) {
    configs = $$1
    debug_and_release_params = # 匹配预选队列
    keys = debug Debug release Release debug_and_release
    for (iter, configs) {
        contains(keys, $$iter) {
            debug_and_release_params += $$iter
        }
    }

    for (iter, debug_and_release_params) {
        configs -= $$iter # 移除预选队列的属性
    }

    configs += $$last(debug_and_release_params) # 添加(保留)预选队列的最后属性

    return($$configs)
}
# 使用
CONFIG = $$remove_extra_config_parameter($$CONFIG)
